package com.superjson.showpro.service.impl;

import com.superjson.showpro.base.GenericServiceImpl;
import com.superjson.showpro.dao.AreaDao;
import com.superjson.showpro.entity.Area;
import com.superjson.showpro.service.AreaService;
import com.superjson.showpro.shared.result.Result;
import com.superjson.showpro.shared.result.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created By zby on 21:50 2019/5/28
 */
@Service
public class AreaServiceImpl extends GenericServiceImpl<Area> implements AreaService {

    private AreaDao areaDao;

    @Autowired
    public AreaServiceImpl(AreaDao areaDao) {
        super(areaDao);
        this.areaDao = areaDao;
    }

    @Override
    public Result<List<Area>> childList(Long pid) {
        return ResultUtil.buildSuccess(areaDao.childList( pid));
    }
}
